SG Window Window Object
EnableMessage Method

©1998 by Stinga

Properties     Methods      Events     Constants     Error Codes
Description

Enables or disables firing of the Message events and calling of callback interfaces for specified message.

Syntax

object.EnableMessage(msg As WinMsg, Optional enable As Boolean = True)

Part Description
object The object is expression that evaluates to Window object
msg Required. Message code of the message that will be enabled or disabled. WinMsg enumerator lists constants that can be used as a value for this parameter.
enable Optional. If True message is enabled; otherwise message is disabled. Default value is True.
Remarks

To receive any message, you must enable it using EnableMessage or EnableMessageRange methods. wm_ALL is special message code that can be used to enable or disable all messages.

Example

Following example shows how to enable mouse move messages:

Public WithEvents wnd As SGWindow.Window

Sub Form_OnLoad()
   Set wnd = new SGWindow.Window
   wnd.hWnd = Me.hWnd
   wnd.EnableMessage wm_MOUSEMOVE
   wnd.Hooked = True
End Sub